<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>管理员模块 - 用户管理</title>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css">
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
        }
        
        body {
            background-color: #f5f7fa;
            color: #333;
            line-height: 1.6;
        }
        
        .container {
            max-width: 1200px;
            margin: 0 auto;
            padding: 20px;
        }
        
        /* 头部样式 */
        header {
            background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
            color: white;
            padding: 15px 0;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
            position: sticky;
            top: 0;
            z-index: 100;
        }
        
        .header-content {
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        
        .logo {
            font-size: 24px;
            font-weight: bold;
            display: flex;
            align-items: center;
        }
        
        .logo i {
            margin-right: 10px;
            font-size: 28px;
        }
        
        .user-info {
            display: flex;
            align-items: center;
            gap: 20px;
        }
        
        .points, .task-btn {
            background: rgba(255, 255, 255, 0.2);
            padding: 8px 15px;
            border-radius: 20px;
            display: flex;
            align-items: center;
            gap: 8px;
            cursor: pointer;
            transition: all 0.3s ease;
        }
        
        .points:hover, .task-btn:hover {
            background: rgba(255, 255, 255, 0.3);
            transform: translateY(-2px);
        }
        
        .task-dropdown {
            position: relative;
            display: inline-block;
        }
        
        .task-menu {
            display: none;
            position: absolute;
            right: 0;
            top: 100%;
            background: white;
            border-radius: 10px;
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
            width: 180px;
            padding: 10px 0;
            margin-top: 10px;
            z-index: 1000;
        }
        
        .task-menu a {
            display: flex;
            align-items: center;
            padding: 12px 20px;
            color: #333;
            text-decoration: none;
            transition: all 0.2s ease;
        }
        
        .task-menu a:hover {
            background: #f0f5ff;
            color: #2575fc;
        }
        
        .task-menu a i {
            margin-right: 10px;
            width: 20px;
            text-align: center;
        }
        
        .task-dropdown:hover .task-menu {
            display: block;
        }
        
        /* 页面标题 */
        .page-title {
            display: flex;
            align-items: center;
            margin: 20px 0;
            font-size: 24px;
            font-weight: 700;
            color: #2c3e50;
        }
        
        .page-title i {
            margin-right: 10px;
            color: #3498db;
        }
        
        /* 操作栏 */
        .action-bar {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 20px;
            padding: 15px;
            background: white;
            border-radius: 10px;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
        }
        
        .search-box {
            display: flex;
            align-items: center;
            background: #f0f4f8;
            padding: 8px 15px;
            border-radius: 20px;
            width: 300px;
        }
        
        .search-box input {
            border: none;
            background: transparent;
            padding: 5px 10px;
            width: 100%;
            outline: none;
        }
        
        .action-buttons {
            display: flex;
            gap: 10px;
        }
        
        .btn {
            padding: 10px 20px;
            border-radius: 5px;
            cursor: pointer;
            font-weight: 600;
            transition: all 0.3s ease;
            display: flex;
            align-items: center;
            gap: 8px;
        }
        
        .btn-primary {
            background: #3498db;
            color: white;
            border: none;
        }
        
        .btn-primary:hover {
            background: #2980b9;
        }
        
        .btn-secondary {
            background: transparent;
            color: #3498db;
            border: 1px solid #3498db;
        }
        
        .btn-secondary:hover {
            background: #f0f5ff;
        }
        
        /* 用户表格 */
        .user-table {
            background: white;
            border-radius: 10px;
            padding: 20px;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
            margin-bottom: 30px;
        }
        
        table {
            width: 100%;
            border-collapse: collapse;
        }
        
        th, td {
            padding: 15px;
            text-align: left;
            border-bottom: 1px solid #eee;
        }
        
        th {
            background-color: #f8f9fa;
            font-weight: 600;
            color: #2c3e50;
        }
        
        tr:hover {
            background-color: #f8f9fa;
        }
        
        .status {
            padding: 5px 10px;
            border-radius: 15px;
            font-size: 12px;
            font-weight: 600;
        }
        
        .status-active {
            background: #d5f5e3;
            color: #27ae60;
        }
        
        .status-inactive {
            background: #f9e3e3;
            color: #c0392b;
        }
        
        .action-icons {
            display: flex;
            gap: 10px;
        }
        
        .action-icon {
            cursor: pointer;
            padding: 8px;
            border-radius: 5px;
            transition: all 0.3s ease;
        }
        
        .action-icon:hover {
            background-color: #f0f4f8;
        }
        
        /* 分页 */
        .pagination {
            display: flex;
            justify-content: center;
            margin-top: 20px;
            gap: 8px;
        }
        
        .page-item {
            padding: 8px 14px;
            border: 1px solid #ddd;
            border-radius: 5px;
            cursor: pointer;
            font-size: 14px;
            transition: all 0.3s ease;
        }
        
        .page-item:hover {
            background: #f0f4f8;
        }
        
        .page-item.active {
            background: #3498db;
            color: white;
            border-color: #3498db;
        }
        
        /* 筛选对话框 */
        .modal-overlay {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background-color: rgba(0, 0, 0, 0.5);
            display: flex;
            justify-content: center;
            align-items: center;
            z-index: 1000;
            display: none;
        }
        
        .modal-content {
            background-color: white;
            border-radius: 10px;
            width: 500px;
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
            overflow: hidden;
        }
        
        .modal-header {
            padding: 16px 20px;
            border-bottom: 1px solid #e8e8e8;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        
        .modal-title {
            font-size: 18px;
            font-weight: 600;
            color: #2c3e50;
        }
        
        .close-btn {
            background: none;
            border: none;
            font-size: 20px;
            cursor: pointer;
            color: #95a5a6;
        }
        
        .modal-body {
            padding: 20px;
        }
        
        .form-group {
            margin-bottom: 20px;
        }
        
        .form-label {
            display: block;
            margin-bottom: 8px;
            font-weight: 500;
            color: #34495e;
        }
        
        .form-input {
            width: 100%;
            padding: 10px 12px;
            border: 1px solid #dcdfe6;
            border-radius: 4px;
            font-size: 14px;
            transition: border-color 0.3s;
        }
        
        .form-input:focus {
            outline: none;
            border-color: #3498db;
        }
        
        .form-select {
            width: 100%;
            padding: 10px 12px;
            border: 1px solid #dcdfe6;
            border-radius: 4px;
            font-size: 14px;
            background-color: white;
        }
        
        .radio-group {
            display: flex;
            gap: 20px;
        }
        
        .radio-item {
            display: flex;
            align-items: center;
            gap: 6px;
        }
        
        .modal-footer {
            padding: 16px 20px;
            border-top: 1px solid #e8e8e8;
            display: flex;
            justify-content: flex-end;
            gap: 10px;
        }
        
        /* 响应式设计 */
        @media (max-width: 768px) {
            .header-content {
                flex-direction: column;
                gap: 15px;
            }
            
            .action-bar {
                flex-direction: column;
                gap: 15px;
            }
            
            .search-box {
                width: 100%;
            }
            
            .action-buttons {
                width: 100%;
                justify-content: space-between;
            }
            
            .modal-content {
                width: 90%;
            }
        }
    </style>
</head>
<body>
    <!-- 头部 -->
    <header>
        <div class="container">
            <div class="header-content">
                <div class="logo">
                    <i class="fas fa-store"></i>
                    <span>邻里社区积分商城</span>
                </div>
                <div class="user-info">
                    <div class="points">
                        <i class="fas fa-coins"></i>
                        <span>我的积分: 2,580</span>
                    </div>
                    <div class="task-dropdown">
                        <div class="task-btn">
                            <i class="fas fa-tasks"></i>
                            <span>积分任务</span>
                        </div>
                        <div class="task-menu">
                            <a href="#">
                                <i class="fas fa-calendar-check"></i>
                                <span>每日签到</span>
                            </a>
                            <a href="#">
                                <i class="fas fa-edit"></i>
                                <span>发布帖子</span>
                            </a>
                            <a href="#">
                                <i class="fas fa-hands-helping"></i>
                                <span>完成求助</span>
                            </a>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </header>

    <!-- 主内容 -->
    <div class="container">
        <div class="page-title">
            <i class="fas fa-users"></i>
            <span>用户管理</span>
        </div>
        
        <!-- 操作栏 -->
        <div class="action-bar">
            <div class="search-box">
                <i class="fas fa-search"></i>
                <input type="text" placeholder="搜索用户...">
            </div>
            <div class="action-buttons">
                <button class="btn btn-primary" id="filterBtn">
                    <i class="fas fa-filter"></i>
                    <span>筛选用户</span>
                </button>
                <button class="btn btn-secondary">
                    <i class="fas fa-plus"></i>
                    <span>添加用户</span>
                </button>
            </div>
        </div>
        
        <!-- 用户表格 -->
        <div class="user-table">
            <table>
                <thead>
                    <tr>
                        <th>ID</th>
                        <th>用户名</th>
                        <th>手机号</th>
                        <th>昵称</th>
                        <th>性别</th>
                        <th>积分</th>
                        <th>状态</th>
                        <th>操作</th>
                    </tr>
                </thead>
                <tbody>
                    <tr>
                        <td>10001</td>
                        <td>zhangsan</td>
                        <td>138****1234</td>
                        <td>张三</td>
                        <td>男</td>
                        <td>1,250</td>
                        <td><span class="status status-active">正常</span></td>
                        <td class="action-icons">
                            <span class="action-icon" title="查看"><i class="fas fa-eye"></i></span>
                            <span class="action-icon" title="编辑"><i class="fas fa-edit"></i></span>
                            <span class="action-icon" title="删除"><i class="fas fa-trash"></i></span>
                        </td>
                    </tr>
                    <tr>
                        <td>10002</td>
                        <td>lisi</td>
                        <td>139****5678</td>
                        <td>李四</td>
                        <td>男</td>
                        <td>3,450</td>
                        <td><span class="status status-active">正常</span></td>
                        <td class="action-icons">
                            <span class="action-icon" title="查看"><i class="fas fa-eye"></i></span>
                            <span class="action-icon" title="编辑"><i class="fas fa-edit"></i></span>
                            <span class="action-icon" title="删除"><i class="fas fa-trash"></i></span>
                        </td>
                    </tr>
                    <tr>
                        <td>10003</td>
                        <td>wangwu</td>
                        <td>137****9012</td>
                        <td>王五</td>
                        <td>女</td>
                        <td>780</td>
                        <td><span class="status status-inactive">禁用</span></td>
                        <td class="action-icons">
                            <span class="action-icon" title="查看"><i class="fas fa-eye"></i></span>
                            <span class="action-icon" title="编辑"><i class="fas fa-edit"></i></span>
                            <span class="action-icon" title="删除"><i class="fas fa-trash"></i></span>
                        </td>
                    </tr>
                    <tr>
                        <td>10004</td>
                        <td>zhaoliu</td>
                        <td>136****3456</td>
                        <td>赵六</td>
                        <td>女</td>
                        <td>5,620</td>
                        <td><span class="status status-active">正常</span></td>
                        <td class="action-icons">
                            <span class="action-icon" title="查看"><i class="fas fa-eye"></i></span>
                            <span class="action-icon" title="编辑"><i class="fas fa-edit"></i></span>
                            <span class="action-icon" title="删除"><i class="fas fa-trash"></i></span>
                        </td>
                    </tr>
                </tbody>
            </table>
            
            <!-- 分页 -->
            <div class="pagination">
                <div class="page-item">上一页</div>
                <div class="page-item active">1</div>
                <div class="page-item">2</div>
                <div class="page-item">3</div>
                <div class="page-item">下一页</div>
            </div>
        </div>
    </div>
    
    <!-- 筛选对话框 -->
    <div class="modal-overlay" id="filterModal">
        <div class="modal-content">
            <div class="modal-header">
                <h2 class="modal-title">用户筛选</h2>
                <button class="close-btn" id="closeModal">&times;</button>
            </div>
            <div class="modal-body">
                <div class="form-group">
                    <label class="form-label">用户名</label>
                    <input type="text" class="form-input" placeholder="输入用户名">
                </div>
                
                <div class="form-group">
                    <label class="form-label">手机号</label>
                    <input type="text" class="form-input" placeholder="输入手机号">
                </div>
                
                <div class="form-group">
                    <label class="form-label">昵称</label>
                    <input type="text" class="form-input" placeholder="输入昵称">
                </div>
                
                <div class="form-group">
                    <label class="form-label">性别</label>
                    <select class="form-select">
                        <option value="">全部</option>
                        <option value="male">男</option>
                        <option value="female">女</option>
                    </select>
                </div>
                
                <div class="form-group">
                    <label class="form-label">状态</label>
                    <select class="form-select">
                        <option value="">全部</option>
                        <option value="active">正常</option>
                        <option value="inactive">禁用</option>
                    </select>
                </div>
                
                <div class="form-group">
                    <label class="form-label">查询方式</label>
                    <div class="radio-group">
                        <label class="radio-item">
                            <input type="radio" name="searchType" value="fuzzy" checked>
                            <span>模糊查询</span>
                        </label>
                        <label class="radio-item">
                            <input type="radio" name="searchType" value="exact">
                            <span>精确查询</span>
                        </label>
                    </div>
                </div>
            </div>
            <div class="modal-footer">
                <button class="btn btn-secondary" id="resetBtn">重置</button>
                <button class="btn btn-primary" id="confirmFilter">确认筛选</button>
            </div>
        </div>
    </div>

    <script>
        // 获取DOM元素
        const filterBtn = document.getElementById('filterBtn');
        const filterModal = document.getElementById('filterModal');
        const closeModal = document.getElementById('closeModal');
        const resetBtn = document.getElementById('resetBtn');
        const confirmFilter = document.getElementById('confirmFilter');
        
        // 打开模态框
        filterBtn.addEventListener('click', () => {
            filterModal.style.display = 'flex';
        });
        
        // 关闭模态框
        closeModal.addEventListener('click', () => {
            filterModal.style.display = 'none';
        });
        
        // 点击 overlay 也可以关闭模态框
        filterModal.addEventListener('click', (e) => {
            if (e.target === filterModal) {
                filterModal.style.display = 'none';
            }
        });
        
        // 重置表单
        resetBtn.addEventListener('click', () => {
            const inputs = document.querySelectorAll('.form-input, .form-select');
            inputs.forEach(input => {
                if (input.type === 'text' || input.tagName === 'SELECT') {
                    input.value = '';
                }
            });
            
            // 重置单选按钮
            document.querySelector('input[name="searchType"][value="fuzzy"]').checked = true;
        });
        
        // 确认筛选
        confirmFilter.addEventListener('click', () => {
            // 这里应该是筛选逻辑，此处仅做演示
            alert('筛选条件已应用');
            filterModal.style.display = 'none';
        });
    </script>
</body>
</html>